<template>
  <div class="yellow" v-loading="loading">
    <i class="el-icon-delete"></i>

    <button @click="demo">点击登录</button>
    <view>{{$log('hahha')}}</view>
  </div>
</template>
<script>
export default {
  name: "login",
  data() {
    return {
      loading: false,
    };
  },
  mounted() {},
  methods: {
    demo() {
      this.loading = true;
      setTimeout(() => {
        this.loading = false;
        sessionStorage.setItem("user", "1");
        this.$router.push("/");
      }, 4000);
    },
  },
};
</script>